package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CreditCharityActivityParticipantMapper;
import com.ruoyi.system.domain.CreditCharityActivityParticipant;
import com.ruoyi.system.service.ICreditCharityActivityParticipantService;

/**
 * 公益活动参与记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-26
 */
@Service
public class CreditCharityActivityParticipantServiceImpl implements ICreditCharityActivityParticipantService
{
    @Autowired
    private CreditCharityActivityParticipantMapper creditCharityActivityParticipantMapper;

    /**
     * 查询公益活动参与记录
     * 
     * @param participantId 公益活动参与记录主键
     * @return 公益活动参与记录
     */
    @Override
    public CreditCharityActivityParticipant selectCreditCharityActivityParticipantByParticipantId(Long participantId)
    {
        return creditCharityActivityParticipantMapper.selectCreditCharityActivityParticipantByParticipantId(participantId);
    }

    /**
     * 查询公益活动参与记录列表
     * 
     * @param creditCharityActivityParticipant 公益活动参与记录
     * @return 公益活动参与记录
     */
    @Override
    public List<CreditCharityActivityParticipant> selectCreditCharityActivityParticipantList(CreditCharityActivityParticipant creditCharityActivityParticipant)
    {
        return creditCharityActivityParticipantMapper.selectCreditCharityActivityParticipantList(creditCharityActivityParticipant);
    }

    /**
     * 根据用户ID查询参与记录
     * 
     * @param userId 用户ID
     * @return 参与记录列表
     */
    @Override
    public List<CreditCharityActivityParticipant> selectCreditCharityActivityParticipantByUserId(Long userId)
    {
        return creditCharityActivityParticipantMapper.selectCreditCharityActivityParticipantByUserId(userId);
    }

    /**
     * 新增公益活动参与记录
     * 
     * @param creditCharityActivityParticipant 公益活动参与记录
     * @return 结果
     */
    @Override
    public int insertCreditCharityActivityParticipant(CreditCharityActivityParticipant creditCharityActivityParticipant)
    {
        return creditCharityActivityParticipantMapper.insertCreditCharityActivityParticipant(creditCharityActivityParticipant);
    }

    /**
     * 修改公益活动参与记录
     * 
     * @param creditCharityActivityParticipant 公益活动参与记录
     * @return 结果
     */
    @Override
    public int updateCreditCharityActivityParticipant(CreditCharityActivityParticipant creditCharityActivityParticipant)
    {
        return creditCharityActivityParticipantMapper.updateCreditCharityActivityParticipant(creditCharityActivityParticipant);
    }

    /**
     * 批量删除公益活动参与记录
     * 
     * @param participantIds 需要删除的公益活动参与记录主键
     * @return 结果
     */
    @Override
    public int deleteCreditCharityActivityParticipantByParticipantIds(Long[] participantIds)
    {
        return creditCharityActivityParticipantMapper.deleteCreditCharityActivityParticipantByParticipantIds(participantIds);
    }

    /**
     * 删除公益活动参与记录信息
     * 
     * @param participantId 公益活动参与记录主键
     * @return 结果
     */
    @Override
    public int deleteCreditCharityActivityParticipantByParticipantId(Long participantId)
    {
        return creditCharityActivityParticipantMapper.deleteCreditCharityActivityParticipantByParticipantId(participantId);
    }
} 